package com.flashflexpro.tanksinbattle.scene.dto;

/**
 * @author gyang@brightcove.com
 */
public abstract class Dto {

    private static long id_counter = 0;
    protected Dto() {
        //if don't set explicitly, it will increase automatically.
        id = id_counter ++;
    }

    private long id;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        if( obj == null ){
            return false;
        }
        return id == ((Dto)obj).getId();
    }
}
